/*! \mainpage Shell++ - Operating System 2
 *
 * \section team_sec Team
 *
 * Nistor Radu, Paun Alexandru, Popa Alex.
 *
 * \subsection about_sec About the project
 *
 * The goal of this project is to develop further the shell we made in the first semester
 *
 * \subsubsection shell_futures_sec Goals
 *  
 * -# <b>for each command it will start a new process</b>
 * -# <b>redirect stdio, stdin, stderr</b>
 * -# <b>execute one command after another</b>
 * -# <b>view and edit system variables</b>
 * -# <b>run shell scripts</b>
 * -# redirecting and treating signals
 * -# <b>connecting to commands with pipe</b>
 * -# process management (background and forward processes)
 *
 *	goals marked in bold are completed
 *
 * \section links_sec Usefull links
 *	<a href="http://code.google.com/p/shell-plus/">Google code page for the project</a> 
 *  <br/>
 *	<a href="http://sites.google.com/site/operatingsystems2project/proiecte/shell-plus">Laboratory project page</a> 
 */

/** 
 * shell++ main header file
 */

#ifndef SHELLPP_H
#define	SHELLPP_H

#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <limits.h>

#include <readline/readline.h>
#include <readline/history.h>

#include <sys/types.h>
#include <sys/wait.h>

#define WORD_DELIM      " " ///< Sets empty char as word separation
#define MAX_WORDS       100 ///< Sets th maximum number of words
#define MAX_ARGS        20  ///< Maximum arguments
#define MAX_NAME        20  ///< the max lengh a process name can have
#define MAX_FILENAME    20 ///< max filename lengh
#define STDIN           0  ///< sets stdin to 0
#define STDOUT          1  ///< sets stdout to 1 
#define MAX_LEN_SINGLE_LINE     120 ///< sets max single line 


// Flags
#define F_RUNAND        (1 << 0) /* 0x01 */
#define F_RUNOR         (1 << 1) /* 0x02 */
#define F_RUNBG         (1 << 2)
#define F_PIPE          (1 << 3)
#define F_STDIN         (1 << 4)
#define F_STDOUT        (1 << 5)

typedef short unsigned int FLAG; /* 16 biti */

#endif	/* _SHELLPP_H */
